package com.xca.znb.presenter;

import com.xca.znb.contact.MineContact;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IMineModel;

public class MinesPresenter {
    private MineContact mineContact ;
    private IMineModel iMineModel ;
    public MinesPresenter(MineContact mineContact , IMineModel iMineModel ){
        this.mineContact = mineContact ;
        this.iMineModel = iMineModel ;
    }

    //展示头像
    public void showMessage(String phone){
        User user =  iMineModel.getUser(phone);
        if (user != null){
//            String avatarPath = user.getConcern();
//          if (avatarPath == null ){
//              mineContact.onMineUserAvatarShow("mine_b.png");
//            }else {
//                mineContact.onMineUserAvatarShow(avatarPath);
//          }
            String name = user.getName();
            mineContact.onMineUserNameShow(name);
        }
    }

    public User getUserByPhone(String phone){
        return iMineModel.getUser(phone);
    }
    public double showNum(String phone){
        return iMineModel.getNum(phone);
    }

    public void onMineShoppingCartClick(){
        mineContact.onMineShoppingCartClick();
    }
    public void onMineCollectionClick(){
        mineContact.onMineCollectionClick();
    }
    public void onMineFootPrintClick(){
        mineContact.onMineFootPrintClick();
    }
    public void onMineAllOrdersClick(){
        mineContact.onMineAllOrdersClick();
    }
    public void onMineToBeShippedClick(){
        mineContact.onMineToBeShippedClick();
    }
    public void nMineToBeReceivedClick(){
        mineContact.onMineToBeReceivedClick();
    }
    public void nMineToBeEvaluatedClick(){
        mineContact.onMineToBeEvaluatedClick();
    }
    public void onMIneAfterSalesClick(){
        mineContact.onMIneAfterSalesClick();
    }
    public void onMineCouponsClick(){
        mineContact.onMineCouponsClick();
    }
    public void onMineBalanceClick(){
        mineContact.onMineBalanceClick();
    }
    public void onMineGoldClick(){
        mineContact.onMineGoldClick();
    }


    public void onToSettingButtonClick(){
        mineContact.onToSettingButtonClick();
    }
}
